class Person:
  def __init__(self):
    # 定义私有属性
    self.__name = ""
    self.__age = 0

  def set_name(self, name):
    self.__name = name

  def set_age(self, age):
    # 年龄判断
    if age > 0:
      self.__age = age
    else:
      print("年龄必须大于0")

  def __get_name(self):
    return self.__name

  def __get_age(self):
    return self.__age

  def introduce(self):
    print(f"我叫{self.__get_name()}，今年{self.__get_age()}岁")

p1 = Person()
p1.set_name("张三")
p1.set_age(18)
p1.introduce()

p2 = Person()
p2.set_name("王五")
p2.set_age(25)
p2.introduce()
